//
//  OCDefine.h
//  SwiftDemo_1
//
//  Created by 黄龙 on 2022/10/17.
//

#ifndef OCDefine_h
#define OCDefine_h

#import "OCFunc.h"


#define _RGB_HEX_2_COLOR(colorHex) ([OCFunc colorWithHexString:colorHex])
#define _RGBA_HEX_2_COLOR(colorHex,alphaValue)  ([OCFunc colorWithHex:colorHex alpha:alphaValue])

//#define yyTime_Orange_Color _RGB_HEX_2_COLOR(@"fb7b23")
#define _color_Clear [UIColor clearColor]

//返回指定大小系统字体uifont
#define _SYSFONT(fontSize) [UIFont systemFontOfSize:fontSize]
#define _SYSFONT_BOLD(fontSize) [UIFont boldSystemFontOfSize:fontSize]
#define _SYSFONT_ITALIC(fontSize) [UIFont italicSystemFontOfSize:fontSize]
#define _SYSFONT_WEIGHT(fontSize,fontWeight) [UIFont systemFontOfSize:fontSize weight:fontWeight]
#define _SYSFONT_FIXW(fontSize)  [UIFont fontWithName:@"Courier" size:fontSize]


#define _APP_PATHFORRESOURCE(fileName,fileType) ([[NSBundle mainBundle] pathForResource:fileName ofType:fileType])
#define _APP_URLFORRESOURCE(fileName) [[NSBundle mainBundle] URLForResource:fileName withExtension:nil]

//从资源文件中读取
#define _IMAGE(imgName,Ext) ([UIImage imageWithContentsOfFile:_APP_PATHFORRESOURCE(imgName,Ext)])
//从文件中读取
#define _IMAGE_OF_PATH(imgPath) [UIImage imageWithContentsOfFile:imgPath]
//定义UIImage对象2(从缓存读取)
#define _IMAGE_OF_NAME(fileName)  [UIImage imageNamed:fileName]


#endif /* OCDefine_h */
